
#ifndef _ATTRIBUTE
#define _ATTRIBUTE

#include "attribprototype.h"
#include <map>
using namespace std;


class Attribute
{
public:
  Attribute( string _name, AttribPrototype* _prototype );
  string getName();
  string getPrototypeName();
  map<string,string> getProperties();
  bool setPropertyValue( string _prop, bool _value );
  bool setPropertyValue( string _prop, int _value );
  bool setPropertyValue( string _prop, double _value );
  bool setPropertyValue( string _prop, string _value );
  bool setPropertyValues( string _prop, string _value );
  bool isApplicableOnVertex() { return m_prototype->isApplicableOnVertex(); };
  bool isApplicableOnEdge()   { return m_prototype->isApplicableOnEdge(); };
  bool isApplicableOnFace()   { return m_prototype->isApplicableOnFace(); };
  vector<int> getSymbol( string _prop );
protected:
private:
  AttribPrototype* m_prototype;
  string m_name;
  map<string,bool>   m_propBool;
  map<string,int>    m_propInteger;
  map<string,double> m_propReal;
  map<string,string> m_propString;
};


#endif
